package kr.hkit.androidcomplete02.ch03;

import java.util.Calendar;
import java.util.GregorianCalendar;

import kr.hkit.androidcomplete02.R;
import android.app.Activity;
import android.app.DatePickerDialog;
import android.os.Bundle;
import android.view.View;
import android.widget.DatePicker;
import android.widget.TextView;

public class PickerDialogTest extends Activity {
	int mYear,mMonth,mDay,mHour,mMinute;
	TextView mTxtDate;
	TextView mTxtTime;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.progressbartest);
		
		mTxtDate = (TextView) findViewById(R.id.txtdate);
		mTxtTime = (TextView) findViewById(R.id.texttime);
		
		Calendar cal = new GregorianCalendar();
		mYear = cal.get(Calendar.YEAR);
		mMonth = cal.get(Calendar.MONTH);
		mDay =  cal.get(Calendar.DAY_OF_MONTH);
		mHour =  cal.get(Calendar.HOUR_OF_DAY);
		mMinute =  cal.get(Calendar.MINUTE);
		
		UpdateNow();
	}
	
	public void mOnClick(View v) {
		switch(v.getId()){
		case R.id.btnchangedate:
			new DatePickerDialog(PickerDialogTest.this,mDateSetListener,mYear,mMonth,
					mDay).show();
		}
	}
	DatePickerDialog.OnDateSetListener mDateSetListener =
			new DatePickerDialog.OnDateSetListener() {
				
				@Override
				public void onDateSet(DatePicker view, int year, int monthOfYear,
						int dayOfMonth) {
					// TODO Auto-generated method stub
					
				}
			};

	public void UpdateNow() {
		// TODO Auto-generated method stub
		
	}
	
}
